package com.firewolf.springboot.main;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

import com.firewolf.springboot.servlet.MyServlet1;

@SpringBootApplication
@ComponentScan(basePackages = { "com.firewolf.springboot" })
@ServletComponentScan(basePackages = { "com.firewolf.springboot" })
public class Application {

	@Bean
	public ServletRegistrationBean MyServlet1() {
		return new ServletRegistrationBean(new MyServlet1(), "/myServlet1/*");
	}

	public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}
}
